<?php

namespace app\common\logic;

use app\common\exception\LogicException;

class PictureCodeLogic
{
    /**
     * @Description 检查验证码是否正确
     * @author: zj
     * @param string $value
     * @time 2023/08/29 11:18:44
     * @return true
     */
    public function checkMathCode(string $value)
    {
        $captcha = new CaptchaLogic();
        $check = $captcha->check($value);

        if (!$check) {
            throw new LogicException('图形验证码错误');
        }

        return true;
    }
}